:root {
    --primary-color: #2c80ff;
    --secondary-color: #6c757d;
    --success-color: #34c38f;
    --warning-color: #f1b44c;
    --danger-color: #f46a6a;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: #495057;
    overflow-x: hidden;
}

/* 布局样式 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2c3e50 0%, #3498db 100%);
    color: white;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left: 4px solid var(--primary-color);
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.menu-group {
    margin-top: 10px;
}

.menu-group-title {
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    transition: all 0.3s;
}

/* 顶部导航栏样式 */
.header {
    height: var(--header-height);
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    font-size: 20px;
    cursor: pointer;
    margin-right: 15px;
    color: var(--secondary-color);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

/* 筛选条件样式 */
.filter-bar {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.filter-item {
    min-width: 150px;
}

.filter-label {
    font-size: 12px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.filter-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 指标卡样式 */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.metric-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.metric-title {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.metric-value {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.metric-trend {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.trend-up {
    color: var(--success-color);
}

.trend-down {
    color: var(--danger-color);
}

/* 图表容器样式 */
.chart-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
}

.chart-actions {
    display: flex;
    gap: 10px;
}

.chart-content {
    height: 300px;
    position: relative;
}

/* 表格样式 */
.table-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.table-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 16px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--secondary-color);
}

tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background-color: rgba(52, 195, 143, 0.1);
    color: var(--success-color);
}

.status-warning {
    background-color: rgba(241, 180, 76, 0.1);
    color: var(--warning-color);
}

.status-danger {
    background-color: rgba(244, 106, 106, 0.1);
    color: var(--danger-color);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .menu-text, .sidebar .menu-group-title {
        display: none;
    }

    .sidebar-header h2 {
        display: none;
    }

    .main-content {
        margin-left: 70px;
    }

    .menu-item {
        justify-content: center;
    }

    .menu-item i {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .metrics-container {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-item {
        min-width: 100%;
    }

    .chart-row {
        grid-template-columns: 1fr !important;
    }
}
}